<template>
    <div>
         
    </div>
</template>

<script setup>
import httpRequest from '@/common';
import { ElMessage } from 'element-plus';
import {ref,getCurrentInstance, onMounted,defineProps, watch} from 'vue';

const {proxy} = getCurrentInstance();

//获取父组件传递的registerId  挂号id
const props = defineProps({
    rid:{
        type: Number,
        required: true
    }
});

const form = ref({
    
})

//  进入该页面说明病例已经创建出来了   先查询该病例
//进入组件就进行查询
const getRecordById = ()=>{

    httpRequest(
        proxy,
        'get',
        '/medicalrecord/register/'+props.rid,
        null,
        resultBean=>{
            form.value = resultBean.data;
        }
    )



}

onMounted(()=>{
    // 在onMounted中直接获取props中父组件的传值会获取不到  设置一个定时任务
    setTimeout(()=>{
        

    },200);
})
</script>

<style>
</style>